import {
	request
} from "../utils/request";
 
// 登陆
export const userLogin = (data) => {
	return request.post('/wxLogin', data)
}

// 修改用户信息
export const updateUserInfo = (data) => {
	return request.post("/sysCustomer/modifyCustomerInfoForWx", data)
}

// 查询存酒信息
export const findStorageWineListForWx = (data) => {
	return request.post("/pssStorageWine/findStorageWineListForWx", data)
}

// 查询取酒信息
export const findRetrievalWineListForWx = (data) => {
	return request.post("/pssRetrievalWine/findRetrievalWineListForWx", data)
}

// 查询排号信息
export const findCurrentGroupNo = (data) => {
	return request.post("/group/number/findCurrentGroupNo", data)
}

// 取号
export const takeGroupNo = (data) => {
	return request.post("/group/number/takeGroupNo", data)
}

// 取消取号
export const cancelGroupNo = (data) => {
	return request.post("/group/number/cancelGroupNo", data)
}

// 微信banner列表
export const bannerList = (data) => {
	return request.post("/wxBanner/listForWx")
}

// 分销中心
export const saleCenterInfo = (data) => {
	return request.post("/salary/team/findSaleCenterInfo")
}

// 分销体系
export const saleSystemInfo = (data) => {
	return request.post("/salary/team/findSaleSystemInfo")
}

// 部门详情
export const findSaleTeamDetail = (time) => {
	return request.get("/salary/team/findSaleTeamDetail?yearMonth=" + time)
}


// 搜索客户经理
export const findCustomerManagerDetail = (phone) => {
	return request.get("/salary/team/findCustomerManagerDetail?mobile=" + phone)
}

// 绑定客户经理
export const bindCustomerApi = (id) => {
	return request.get("/salary/team/bind?customerManagerId=" + id)
}

// 解除绑定
export const unBindCustomerApi = () => {
	return request.post("/salary/team/unbind")
}

// 文件上传
export const uploadFileApi = (data) => {
	return request.post("/common/upload", data)
}

// 查询卡台图信息
export const getTableListApi = () => {
	return request.get("/orderCounter/findCounterDetailForWx")
}

// 获取用户信息
export const findCustomerInfoApi = () => {
	return request.post("/sysCustomer/findCustomerInfo")
}

// 获取验证码
export const getCodeApi = (mobile) => {
	return request.get("/sysCustomer/sendVerifyCodeSms?mobile=" + mobile)
}
// 绑定手机号
export const bindPhoneApi = (data) => {
	return request.post("/sysCustomer/bindMobile", data)
}

// 解绑手机
export const unbindMobileApi = () => {
	return request.post("/sysCustomer/unbindMobile")
}

// 一口价支付
export const fixedPricePayApi = (data) => {
	return request.post("/wxDeposit/initiateWxTradeForBooking", data)
}

// 竞价支付
export const bindingPricePayApi = (data) => {
	return request.post("/wxDeposit/initiateWxTradeForBidding", data)
}
// 我的预约
export const findMyBookingListApi = () => {
	return request.post("/orderCounterBooking/findMyBookingList")
}

// 商品类型列表
export const getGoodsTypeListApi = () => {
	return request.post("/productType/findProductTypeListForWx")
}

// 获取商品列表
export const getGoodsListApi = (data) => {
	return request.post("/product/findProductListForWx?productTypeId=" + data.typeId)
}
// 获取套餐商品列表
export const getTCGoodsListApi = () => {
	return request.post("/productPackage/findProductPackageListForWx")
}
// 商品下单结算
export const addCounterOrderFlowDetailForWx = (data) => {
	return request.post("counterOrder/addCounterOrderFlowDetailForWx", data)
}

// 获取竞价列表
export const findMyBiddingListApi = () => {
	return request.post("orderCounterBidding/findMyBiddingList")
}

// 查询订单列表
export const findMyCounterOrderListApi = () => {
	return request.post("counterOrder/findMyCounterOrderList")
}

// 查询订单详情
export const findMyCounterOrderDetailApi = (id) => {
	return request.get("counterOrder/findMyCounterOrderDetail?id=" + id)
}

// 查看套餐详情
export const findDetailListApi = (id) => {
	return request.get("productPackage/findDetailList?id=" + id)
}

// 发起实名认证
export const realNameAuthenticationApi = (data) => {
	return request.post("/sysCustomer/getEidToken", data)
}

// 获取实名认证结果
export const getRealNameAuthResApi = (data) => {
	return request.post("/sysCustomer/getEidResult", data)
}

// 改变用户实名认证
export const changeCertificationApi = (idCard) => {
	return request.post("/sysCustomer/changeCertification", {
		idCard
	})
}

// 获取可投诉 员工列表
export const getComplaintsUserListApi = (data) => {
	return request.post("/sysCustomer/getUserNum", data)
}

// 发起投诉
export const complainAddApi = (data) => {
	return request.post("/bar/complain/add", data)
}

// 获取手机号
export const getPhoneApi = (data) => {
	return request.post("sysCustomer/getWxPhoneNumber", data)
}

// 成立社区
export const initiateSaleTeamApi = (data) => {
	return request.post("salary/team/initiateSaleTeam", data)
}

// 解散社区
export const disbandSaleTeam = (id) => {
	return request.get("salary/team/disbandSaleTeam?saleTeamId=" + id)
}

// 修改社区
export const modifySaleTeamInfo = (data) => {
	return request.post("/salary/team/modifySaleTeamInfo", data)
}

// 提现记录
export const findApprovalListForWx = () => {
	return request.get("/salarySalePayAccount/findApprovalListForWx")
}

// 我的余额
export const findMyPayAccountApi = () => {
	return request.get("/salarySalePayAccount/findMyPayAccount")
}

// 发起提现
export const initiateSalePayAccountApprovalApi = (money) => {
	return request.get("/salarySalePayAccount/initiateSalePayAccountApproval?approvalPrice=" + money)
}

// 呼叫服务员
export const callWaiterApi = (counterNo) => {
	return request.get("/callWaiter?counterNo=" + counterNo)
}

// 解绑银行卡
export const unbindBankCard = () => {
	return request.get("/sysCustomer/unbindBankCard")
}

// 绑定银行卡
export const bindBankCardApi = (data) => {
	return request.post("/sysCustomer/bindBankCard", data)
}

// 我的收入
export const myIncomeApi = (month) => {
	return request.get("/sale/salary/myIncome?month=" + month)
}


// 我的收入月份列表
export const myIncomeDetailsApi = (data) => {
	return request.post("/sale/salary/myIncomeDetails", data)
}


// 我的收入详情
export const monthListApi = () => {
	return request.get("/sale/salary/month")
}

// 弟弟详情信息
export const infoAndBorderList = (id, yearMonth) => {
	return request.get("/salary/team/infoAndBorderList?customerId=" + id + "&yearMonth=" + yearMonth)
}

// 获取某人的薪资月份列表
export const customerMonthListApi = (id, ) => {
	return request.get("/sale/salary/customerMonthList?customerId=" + id)
}

// 根据卡台编号查询购物车表头信息
export const orderInfoApi = (counterNo) => {
	return request.post("/counterOrder/cart/orderInfo", {
		counterNo
	})
}

// 获取字典数据
export function getDicts(dictType) {
	return request.get('/system/dict/data/type/' + dictType)
}

// 获取可以拼卡的数据
export function getOrdershareCounter() {
	return request.get('/CounterShareStatus/GetOrderShareCounter')
}

// 发起拼卡
export function initiateShareApi(data) {
	return request.post('/CounterShareStatus/initiateShare', data)
}

// 获取自己发起的拼卡
export function getMyOrderShareApi(data) {
	return request.post('/CounterShareStatus/GetMyOrderShare',data)
}

// 加入拼卡
export function joinShareApi(data) {
	return request.post('/CounterShareStatus/joinShare', data)
}

// 可参与的拼卡列表
export function getOrderParticipateShareCounterApi(id) {
	if (id) return request.get('/CounterShareStatus/GetOrderParticipateShareCounter?id=' + id)
	return request.get('/CounterShareStatus/GetOrderParticipateShareCounter')
}

// 拼卡支付
export function payShareApi(shareStatusId) {
	return request.post('/CounterShareStatus/payShare', {
		shareStatusId
	})
}

// 审核拼卡

export function auditShareApi(data) {
	return request.post('/CounterShareStatus/auditShare', data)
}

// 我加入的拼卡
export function getMyJoinedOrderShareApi(data) {
	return request.post('/CounterShareStatus/GetMyJoinedOrderShare',data)
}

// 查看当前购物车信息
export function getCarListApi(data) {
	return request.post('/counterOrder/cart/list', data)
}

// 获取套餐列表
export function listForPadApi(id) {
	return request.get('/product/listForPad?productTypeId=' + id)
}


// 购物车信息回显
export function findMyCartForWxApi(data) {
	return request.post('/counterOrder/findMyCartForWx', data)
}


// 拼卡支付
export function payJoinShareApi(participateId) {
	return request.post('/CounterShareStatus/payJoinShare', {
		participateId
	})
}

// 微信查询电子账户明细
export function findAccountDetailForWx(participateId) {
	return request.get('/sysCustomerAccount/findAccountDetailForWx')
}

// 查询银行卡开户行
export function getCardOpenName(cardNo) {
	return request.get(`https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?cardNo=${cardNo}&cardBinCheck=true`)
}
// 待审核的弟弟列表
export function relationExamineListApi() {
	return request.get('/relationExamine/list')
}

// 审核弟弟绑定
export function relationExamineEditApi(data) {
	return request.post('/relationExamine/edit', data)
}

// 获取定桌权限
export function relationExaminePermissionApi() {
	return request.get('/salary/team/permission', )
}

// 购物车支付
export function cartWxPay(data) {
	return request.post('/counterOrder/toPayForWx', data)
}

// 未完成支付订单发起继续支付接口
export function getUnPaidApi(data) {
	return request.post('/counterOrder/cart/getUnPaid', data)
}
// 取消支付
export function cancelPayApi(data) {
	return request.post('/counterOrder/cart/cancelPay', data)
}

export function listAllStructureApi() {
	return request.get('/salary/structure/listAll')
}

// 获取参与拼卡的人
export function joinMyPkListApi(id,filterType) {
	return request.get('/CounterShareStatus/pkListById?id=' + id + '&filterType=' + filterType)
}


// 发起签约
export function initiateSigningApi(id) {
	return request.get('/signing/initiateSigning')
}


// 离场标记
export function outPartyApi(id) {
	return request.put('/CounterShareStatus/outParty?id=' + id)
}

// 上传微信二维码
export function uploadWxQrCodeApi(data) {
	return request.post('/sysCustomer/uploadWxQrCode', data)
}

// 获取微信二维码
export function getWxQrCodeApi(data) {
	return request.post('/CounterShareStatus/getWxQrCode', data)
}

// 踢出成员
export function kickUserApi(data) {
	return request.post('/CounterShareStatus/kickUser', data)
}

// 优先拼卡
export function payJoinShare2Api(data) {
	return request.post('/CounterShareStatus/payJoinShare2', data)
}

// 获取是否在拼卡白名单中
export function isInWhiteListApi() {
	return request.get('/OrderCounterShareWhitelist/isInWhiteList')
}

// 查看参与拼卡人列表
export function findShareParticipateByIdApi(id) {
	return request.get('/CounterShareStatus/findShareParticipateById?id=' + id)
}

// 查看拼卡详情
export function getPinKaDetailApi(id) {
	return request.get('/CounterShareStatus/getPinKaDetail?id=' + id)
}

// 查看拼卡详情
export function getPinKaDetail2Api(id) {
	return request.get('/CounterShareStatus/getPinKaDetail2?id=' + id)
}

// 解散拼卡
export function dismissShareApi(data) {
	return request.post('/CounterShareStatus/dismissShare',data)
}

// 测试发送消息
export function sendWaitPayMessageApi() {
	return request.get('/CounterShareStatus/sendWaitPayMessage')
}

// 获取当前用户信息	
export function getCurrentUserInfoApi() {
	return request.get('/sysCustomer/getCurrentUserInfo')
}

// 接受分享
export function acceptShareApi(data) {
	return request.post('/CounterShareStatus/acceptShare',data)
}
